Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bundler dependency #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

koenpunt
Copy link

This change makes using bundler optional

More on this here: https://github.com/capistrano/bundler#usage

@@ -18,7 +18,7 @@ namespace :unicorn do
info "unicorn is running..."
else
with rails_env: fetch(:rails_env) do
execute :bundle, "exec unicorn", "-c", fetch(:unicorn_config_path), "-E", fetch(:unicorn_rack_env), "-D", fetch(:unicorn_options)
execute :unicorn, "-c", fetch(:unicorn_config_path), "-E", fetch(:unicorn_rack_env), "-D", fetch(:unicorn_options)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this

@ernetas
Copy link

ernetas commented Jan 29, 2016

+1

- When running tasks not during a full deployment, you may need to run the `rvm:hook`:

`cap production rvm:hook unicorn:start`

- To use unicorn with bundler, you'll have to add the `capistrano-bundler` gem, and add the unicorn command to the bundle bins:

`set :bundle_bins, fetch(:bundle_bins, []).push('unicorn')`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also you need hook rvm (if you use one):

set :rvm_map_bins, fetch(:rvm_map_bins, []).push('unicorn')

or if rbenv:

set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w(unicorn))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or rbenv for that matter, but people who will use those implementations, will probably know the implication of the usage.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no I didn't knew... I needed to read how sidekiq capistrano tasks was implemented.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w(unicorn))

is incorrect, or at least cumbersome.

this is more concise:

set :rbenv_map_bins, fetch(:rbenv_map_bins, []).push('unicorn')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it work's: set :rvm_map_bins, fetch(:rvm_map_bins).to_a.concat(%w(unicorn)) or set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w(unicorn)) or for : chruby_map_bins or for bundle_bins

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or at least cumbersome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants